<template name="components">
	<view>
		<scroll-view scroll-y class="page">
			<cu-custom bgImage="http://image.hermit.love/img-c1b0f9cabdf814971ad9fb12b7ff2fc1.jpg">
				<block slot="content">
					<!-- <image src="/static/404.jpg" mode="aspectFill" style="width: 240upx;height: 60upx;"></image> -->
					图片分类
				</block>
			</cu-custom>
			<view class="cu-card">
				<view class="cu-item bg-img shadow-blur" :style="[{backgroundImage:'url('+item.img+')'}]" @tap="toChild" :data-url="item.url" :data-title="item.title"
				 v-for="(item,index) in list" :key="index">
					<view class="cardTitle">
						{{item.title}}
					</view>
				</view>
			</view>
			<!-- <view class="cu-tabbar-height"></view> -->
		</scroll-view>
	</view>
</template>

<script>
	export default {
		name: "components",
		data() {
			return {
				StatusBar: this.StatusBar,
				CustomBar: this.CustomBar,
				list: [{
						title: '头像',
						img: 'http://image.hermit.love/IMG_2678.JPG',
						url: '/pages/atlasList/index?type=1'
					},
					{
						title: '壁纸',
						img: 'http://image.hermit.love/593a0fb4c9aefe96ff7b1fb25fc2e6cd.png',
						url: '/pages/atlasList/index?type=2'
					},
					{
						title: '动漫',
						img: 'http://image.hermit.love/202012231450470ff2c1612885d1f0227b98c0f3386c0b.jpg',
						url: '/pages/atlasList/index?type=3'
					},
					// {
					// 	title: '',
					// 	img: '',
					// 	url: '/pages/atlasList/index?type=4'
					// },
					{
						title: '萌宠',
						img: 'http://image.hermit.love/1532317749190.jpeg',
						url: '/pages/atlasList/index?type=5'
					},
					{
						title: '绘图',
						img: 'http://image.hermit.love/445400e0be52ccd740ae2628b71458af.png',
						url: '/pages/atlasList/index?type=6'
					}
				]
			};
		},
		/**
		 * @author smallfour
		 * @description 分享好友
		 */
		onShareAppMessage(res){
			return {
				title:'四叶图集',
				imageUrl:'http://image.hermit.love/IMG_3494.JPG',
				path:'/pages/tabBar/index'
			}
		},
		/**
		 * @author smallfour
		 * @description 分享朋友圈
		 */
		onShareTimeline(){
			return {
				title:'四叶图集',
				imageUrl:'http://image.hermit.love/IMG_3494.JPG',
				path:'/pages/tabBar/index'
			}
		},
		methods: {
			toChild(e) {
				uni.navigateTo({
					url: e.currentTarget.dataset.url + '&title=' + e.currentTarget.dataset.title
				})
			},
		},
	}
</script>

<style>
	.page {
		height: 100vh;
	}

	.cardTitle {
		color: #fff;
		padding: 90upx 60upx;
		font-size: 40upx;
		font-weight: 300;
		transform: skew(-10deg, 0deg);
		position: relative;
		text-shadow: 0px 0px 6upx rgba(0, 0, 0, 0.3)
	}

	.cardTitle::before {
		content: "";
		position: absolute;
		width: 60upx;
		height: 6upx;
		border-radius: 20upx;
		background-color: #fff;
		display: block;
		top: 60upx;
		left: 50upx;
		transform: skew(10deg, 0deg);
	}

	.cardTitle::after {
		content: "";
		position: absolute;
		width: 140upx;
		border-radius: 6upx;
		height: 24upx;
		background-color: #fff;
		display: block;
		bottom: 76upx;
		left: 90upx;
		transform: skew(10deg, 0deg);
		opacity: 0.1;
	}
</style>
